(function () {
 	/**
	 * 异步json获取
	 * @param {String} url 接口地址
	 * @param {Object} param 发送数据
	 * @param {Function} [success] 成功回调
	 * @param {Function} [error] 错误回调
	 */
var iActionId = parseInt(page.url.get('id'));
var $modal = $('#pop-modal');
	
	getPageData({
		id:iActionId
	});

	 function getPageData (Filter)
	 {
	 	var Filter = Filter;
	 		
	 	getJson(Domain+'/ec/usedAuction/doFindAuction.do', Filter, function (res) {
		  
		  if(!res.success){
	
		    $('.am-modal-bd').text(res.errorMessage);
				$modal.modal();
				setTimeout(function () {
					$modal.modal('close');
				},iWiating);

		  }
		  else{

		  	var timeObj = new Date();

		  	renderTmp('#storeinfo', 'storeinfotpl',res);

		  	console.log(res);

		  	if(res.data.auctionStatus==0)
		  	{
		  		$(".countdown").eq(i).downCount({
					date: moment(res.data.auction.startTime).format('YYYY-MM-DD HH:mm:ss'),
					offset:+8,
					now_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss')},
						
						function () {alert("倒计时结束");

					});
		  	}
		  	else if(res.data.auctionStatus==1)
		  	{
		  		$(".countdown2").eq(i).downCount({
					date: moment(res.data.auction.startTime).format('YYYY-MM-DD HH:mm:ss'),
					offset:+8,
					now_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss')},
						
						function () {alert("倒计时结束");

					});
		  	}

	  	 	 
		  }

		});
	 }

})();